package torres.item;

import torres.entity.Entity;
import torres.fileIO.BasicContainer;
import torres.fileIO.ClassContainer;

/**
 * @author Torres
 * Represents an Obstacle, a permanently impassable item.
 */

public class ObstacleItem extends Item
{
	
	/**
	 * Creates a new Obstacle with the specified name.
	 * @param name The name of the Obstacle.
	 */
	public ObstacleItem(String name, int id) {
		super(name, id);
	}
	
	/**
	 * Creates a new Obstacle that is a copy of the specified Obstacle.
	 * @param item The item to be copied.
	 */
	public ObstacleItem(ObstacleItem item) {
		this(item.getName(), item.getID());
	}
	
	/**
	 * Triggers the effect of an Entity walking on this item.
	 * @param e The Entity that is walking on this item
	 */
	public void onTouch(Entity e) {
		
		/* this method intentionally left almost blank */
	}

	
	/* (non-Javadoc)
	 * @see torres.item.Item#save()
	 */
	@Override
	public ClassContainer save() {
		ClassContainer curClass = super.save();
		curClass.addProperty(new BasicContainer("type", "ObstacleItem"));
		return curClass;
	}
/*
	/* (non-Javadoc)
	 * @see torres.item.Item#load(torres.fileIO.ClassContainer)
	 */
	@Override
	public void load(ClassContainer classContainer) {
		// TODO Auto-generated method stub
		
	}
}
